Conversation
Member
Author
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
|
Container images for this PR have been built successfully!
Built from commit 603f93a |
3187920 to
3c1e790
Compare
…ve auth for public endpoints
3c1e790 to
603f93a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Checklist
mainbranchWhat This PR Implements
Fixes:
Changes Made
Testing Done
./scripts/development/dev.sh startjust lint all)just test backendAI Tool Used (if applicable)
AI Tool:
Assistance Level:
What AI helped with:
I reviewed and edited all AI-generated output:
I ran all required tests and manually verified changes:
Additional Context
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR implements "auth by default" by configuring global
humaConfig.Securitywith BearerAuth and ApiKeyAuth, so any operation that doesn't explicitly override itsSecurityfield inherits the requirement. Public endpoints (health, login, OIDC flows, app images, public settings, environment pairing) correctly opt out withSecurity: []map[string][]string{}. Template read endpoints now intentionally require authentication by relying on global inheritance, confirmed by the newTestSetupAPIForSpec_TemplateReadRoutesProtectedtest. The settings model gains a newSettingVisibilityNonAdmintier, surfacing onlypublic- andauthrequired-tagged fields to authenticated non-admin users.Confidence Score: 5/5
Safe to merge — auth-by-default logic is correct and well-tested; only a naming convention P2 remains.
All remaining findings are P2 style suggestions (unexported function naming convention). The core security logic — global security inheritance, public endpoint opt-out, visibility tier filtering — is sound and covered by new tests.
backend/internal/huma/middleware/auth.go — naming convention; no functional issues.
Comments Outside Diff (1)
backend/internal/huma/handlers/templates.go, line 199-209 (link)The four template read handlers (
listTemplates,getAllTemplates,getTemplate,getTemplateContent) now carry an explicitSecurityblock that is byte-for-byte identical to the global API security set inhuma.go. Because any operation that omitsSecurityalready inherits the global default viaparseSecurityRequirements, these blocks add noise without changing behaviour. Removing them would reduce boilerplate and make future global-security changes automatic for these routes.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (2): Last reviewed commit: "fix: set all api endpoints to use auth b..." | Re-trigger Greptile
Context used: